/*统一接口管理*/
import request from "@/utils/request";
import {HospitalDetailInfoResponseData, HospitalResponseData} from "@/api/home/type";

const enum API {

    HOSPITAL_INFO_URL = '/hosp/hospital',
    FINED_HOSPITAL_URL = '/hosp/hospital/findByHosname/'
}

export const home = {
    hospitalInfo: (pageNo: number, pageSize: number,hosType='',districtCode='') => {
        return request.get<any,HospitalResponseData>(`${API.HOSPITAL_INFO_URL}/${pageNo}/${pageSize}?hostype=${hosType}&districtCode=${districtCode}`)
    },
    findByHosname:(hosName:string)=>{
        return request.get<any,HospitalDetailInfoResponseData>(`${API.FINED_HOSPITAL_URL}/${hosName}`)
    }
}
